<template>
    <div class="lib-manage-template">
        <LibDefault v-if="curPath.startsWith('default')" ref="libDefault"></LibDefault>
        <LibCreate v-if="curPath.startsWith('create')||curPath.startsWith('edit')||curPath.startsWith('look')"
                        ref="libCreate"></LibCreate>
    </div>
</template>

<script>
    import LibDefault from "../default/LibDefault";
    import LibCreate from "../create/LibCreate";

    export default {
        name: "LibManage",
        components: {
            LibCreate, LibDefault
        },
        data() {
            return {
                curPath: 'default'
            }
        },
        methods: {
            getWorkNo() {
                let number = this.curPath.split('@')[1];
                console.log(number)
            }
        },
        watch: {
            curPath() {
                this.getWorkNo();
            }
        }
    }
</script>

<style lang="scss">
    .lib-manage-template {
        background-color: #ffffff;
        width: 100%;
        height: 100%;
    }
</style>